import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

import router0 from './project0/router'
import router1 from './project1/router'

export default new Router({
  routes: [
    // {
    //   path: '/',
    //   name: 'HelloWorld',
    //   component: HelloWorld
    // },
    {
      path: '/',
      redirect: '/page'
    },
    {
      path: '/page',
      meta:{index:1},//meta对象的index用来定义当前路由的层级,由小到大,由低到高
      component: resolve => require(['../components/page/Page'], resolve)
    },
    // 【供应商模块】
    // {
    //   path: '/project0/login',
    //   meta:{index:1},//meta对象的index用来定义当前路由的层级,由小到大,由低到高
    //   component: resolve => require(['../components/project0/common/Login'], resolve)
    // },
    // {
    //   path: '/project0/Home',
    //   meta:{index:0},//meta对象的index用来定义当前路由的层级,由小到大,由低到高
    //   component: resolve => require(['../components/project0/common/Home'], resolve),
    //   // children: router0
    // },
    {
      path: '/project0/index',
      component: resolve => require(['../components/project0/Index'], resolve),
      children: router0
    },
    {
      path: '/project1/index',
      component: resolve => require(['../components/project1/Index'], resolve),
      children: router1
    }
    // 【采购商模块】
    // {
    //   path: '/project1/login',
    //   meta:{index:1},//meta对象的index用来定义当前路由的层级,由小到大,由低到高
    //   component: resolve => require(['../components/project1/Login'], resolve)
    // },
    // {
    //   path: '/project1/home',
    //   meta:{index:0},//meta对象的index用来定义当前路由的层级,由小到大,由低到高
    //   component: resolve => require(['../components/project1/Home'], resolve),
    //   children: router1
    // },
    // {
    //   path: '/project1/sign',
    //   meta:{index:0},//meta对象的index用来定义当前路由的层级,由小到大,由低到高
    //   component: resolve => require(['../components/project1/Sign'], resolve),
    //   children: router1
    // },

  ]
})
